{% extends "demo/base.html" %}
    {% block main %}
    <div class="container" role="main">

        <div class="jumbotron row">

            <div class="col-xs-12">
                <h3>书名:<a href="{% url 'novel_index' %}?nurl={{ chapter_obj.novel.url }}" target="_blank">{{ chapter_obj.novel.name }}|作者:{{ chapter_obj.novel.author }}</a>
                </h3>
                <h3>最新章节:<a href="{% url 'novel_chapter' %}?id={{chapter_obj.novel.lasted_chapter.id}}">{{ chapter_obj.novel.update_chapter }}</a></h3>

                <!-- 上一章, 下一章 start-->
            <div class="col-xs-3">
                {% if chapter_obj.prev_chapter %}
                    <a href="{% url 'novel_chapter' %}?id={{chapter_obj.prev_chapter.id}}"><button type="button" class="btn btn-default">上一章({{chapter_obj.prev_chapter.name}})</button></a>
                {% else %}
                    <a href="#"><button type="button" class="btn btn-default">暂无上一章</button></a>
                {% endif %}
            </div>
            <div class="col-xs-3"></div>
            <div class="col-xs-3"></div>
            <div class="col-xs-3">
                {% if chapter_obj.next_chapter %}
                    <a href="{% url 'novel_chapter' %}?id={{chapter_obj.next_chapter.id}}"><button type="button" class="btn btn-default">下一章({{chapter_obj.next_chapter.name}})</button></a>
                {% else %}
                    <a href="#"><button type="button" class="btn btn-default">暂无下一章</button></a>
                {% endif %}
            </div>
                <br/><br/><br/><br/>
            <!-- 上一章, 下一章 end-->

                <hr/>
                <h4>{{ chapter_obj.name }}</h4>
                <p>{{ chapter_obj.html_content|safe}}</p>
                <br/><br/><br/><br/>
            </div>

            <!-- 上一章, 下一章 start-->
            <div class="col-xs-3">
                {% if chapter_obj.prev_chapter %}
                    <a href="{% url 'novel_chapter' %}?id={{chapter_obj.prev_chapter.id}}"><button type="button" class="btn btn-default">上一章({{chapter_obj.prev_chapter.name}})</button></a>
                {% else %}
                    <a href="#"><button type="button" class="btn btn-default">暂无上一章</button></a>
                {% endif %}
            </div>
            <div class="col-xs-3"></div>
            <div class="col-xs-3"></div>
            <div class="col-xs-3">
                {% if chapter_obj.next_chapter %}
                    <a href="{% url 'novel_chapter' %}?id={{chapter_obj.next_chapter.id}}"><button type="button" class="btn btn-default">下一章({{chapter_obj.next_chapter.name}})</button></a>
                {% else %}
                    <a href="#"><button type="button" class="btn btn-default">暂无下一章</button></a>
                {% endif %}
            </div>
            <!-- 上一章, 下一章 end-->

        </div>
</div>

    </div> <!-- /container -->
    {% endblock main %}